package erfgame.frontend.desktop.view.terrain.iso.handler;

import erfgame.frontend.desktop.view.terrain.iso.IsometricTerrainView;

public class ViewDownZLevelSelector implements ZLevelSelector {
	
	private IsometricTerrainView view;
	private int bottomZ;
	
	public ViewDownZLevelSelector( IsometricTerrainView view ) {
		this.view = view;
	}

	public void addZ(int z) {
		bottomZ = Math.max( z, bottomZ );
	}

	public int[] getRange() {
		return new int[]{ view.getBlockZ(), bottomZ / view.getCurrentWorld().getBlockDepth() };
	}

	public void reset() {
		bottomZ = 0;
	}

}
